package arrayList;

import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        //System.out.println("最大值为："+max(3.5,4.6,-110.5,11300));

        Scanner in = new Scanner(System.in);

        System.out.println("请输入需要选择的大小：(SMALL,MEDIUM,LARGE,EXTRA_LARGE");

        //获取用户输入，并直接将其转换为大写字母
        String input = in.next().toUpperCase();
        //定义枚举对象
        Size size = Enum.valueOf(Size.class,input);
        //输出
        System.out.println("size = "+size);
        System.out.println("abbreviation =" +size.getAbbreviation());
        if(size == Size.EXTRA_LARGE)
        {
            System.out.println("GOOD jod - you paid attention to the _.");
        }
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println("######################################");
        System.out.println("请输入周几：(MON,TUS,WEN,THUR,FRI,SAT,SUN）");

        //获取用户输入，并直接将其转换为大写字母
        input = in.next().toUpperCase();
        //定义枚举对象
        DayOfWeek day = Enum.valueOf(DayOfWeek.class,input);
        System.out.println("day = "+day);
        System.out.println("你选择的日期是："+day.getChinese());



    }

    public static double max(double... values){
        //取最小 double 值，负无限
        double largest = Double.NEGATIVE_INFINITY;
        System.out.println("NEGATIVE_INFINITY = "+largest);
        for(double v:values)
        {
            if(v > largest) {
                largest = v;
            }
        }
        return  largest;
    }
}
